package com.yutian.endecryption.mock.mapper;

import com.yutian.endecryption.mock.pojo.SubGroup;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 考官分组信息Mapper
 *
 * @author zhang peng yang ming
 * @create 2017-07-31 9:57
 */
public interface SubGroupMapper {
    @Select("SELECT * FROM vt_subgroup_info WHERE xh=#{xh}")
    SubGroup retrieveSubGroup (String xh);

    @Insert("INSERT INTO vt_subgroup_info (xh, kskm, ksrq, ksdd, kcxh, ksy, glbm, ksxl) VALUES (#{xh}, #{kskm}, #{ksrq}, #{ksdd}, #{kcxh}, #{ksy}, #{glbm}, #{ksxl})")
    int createSubGroup (SubGroup subGroup);

    @Update("UPDATE vt_subgroup_info SET ksrq=#{ksrq} WHERE xh=#{xh}")
    int updateSubGroup (SubGroup subGroup);
}
